//导入路由
import VueRouter from 'vue-router'

//导入路由组件
import Home from './components/tabbar/Home.vue'
import Member from './components/tabbar/Member.vue'
import Search from './components/tabbar/Search.vue'
import Shopcar from './components/tabbar/shopcar.vue'
import Newlist from './components/newlist/newlist.vue'
import NewInfo from './components/newlist/newInfo.vue'
import Photoshare from './components/pic-share/photoshare.vue'
import ShopList from './components/shoplist/shoplist.vue'
import Lunbo from './components/comments/lunbo/lunbo.vue'
import ShopInfo from './components/shoplist/shopinfo.vue'
import Graphic from './components/shoplist/graphic_introduction.vue'
import Comment from './components/comments/comment/comment.vue'

//配置路由
var router = new VueRouter({
    routes: [
        {path:'/',redirect:'/home'},
        {path:'/home',component:Home},
        {path:'/member',component:Member},
        {path:'/search',component:Search},
        {path:'/shopcar',component:Shopcar},
        {path:'/home/newlist',component:Newlist},
        {path:'/home/newInfo/:id',component:NewInfo},
        {path:'/home/photoshare',component:Photoshare},
        {path:'/home/shoplist',component:ShopList},
        {path:'/lunbo',component:Lunbo},
        {path:'/home/shopinfo/:id',component:ShopInfo},
        {path:'/home/graphic/:id',component:Graphic},
        {path:'/home/comment/:id',component:Comment}

    ],
    linkActiveClass:'mui-active'//覆盖默认的路由高亮的类
})

//将路由信息导出
export default router;